package net.onceface.application.impl;

import javax.inject.Named;

import org.springframework.transaction.annotation.Transactional;

import net.onceface.application.ClientProtectInfoApplication;
import net.onceface.application.assembler.ClientProtectInfoAssembler;
import net.onceface.application.commons.InvokeResult;
import net.onceface.core.domain.ClientProtectInfo;

@Named
@Transactional
public class ClientProtectInfoApplicationImpl implements ClientProtectInfoApplication {

	@Override
	public InvokeResult findProtectInfoByClientId(Long clientId) {
		ClientProtectInfo clientProtectInfo = ClientProtectInfo.findByClientId(clientId);
		return InvokeResult.success(ClientProtectInfoAssembler.toDTO(clientProtectInfo));
	}

}
